package com.kyivmohyla.kma2.model;

import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.Date;

public class History implements IsSerializable {
    private int historyId;
    private int newState;
    private Date changeDate;
    private String commentary;
    private int orderId;
    private int staffId;
    private String newStateName;
    private String staffName;

    public History() {
    }

    public int getHistoryId() {
        return historyId;
    }

    public void setHistoryId(int historyId) {
        this.historyId = historyId;
    }

    public int getNewState() {
        return newState;
    }

    public void setNewState(int newState) {
        this.newState = newState;
    }

    public Date getChangeDate() {
        return changeDate;
    }

    public void setChangeDate(Date changeDate) {
        this.changeDate = changeDate;
    }

    public String getCommentary() {
        return commentary;
    }

    public void setCommentary(String commentary) {
        this.commentary = commentary;
    }

    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    public int getStaffId() {
        return staffId;
    }

    public void setStaffId(int staffId) {
        this.staffId = staffId;
    }

    public String getStaffName() {
        return staffName;
    }

    public void setStaffName(String staffName) {
        this.staffName = staffName;
    }

    public String getNewStateName() {
        return newStateName;
    }

    public void setNewStateName(String newStateName) {
        this.newStateName = newStateName;
    }

    public boolean equals(Object other) {
        return (other instanceof History) ? historyId == ((History) other).historyId
                : (other == this);
    }

    @Override
    public int hashCode() {
        return this.getClass().hashCode();
    }

    @Override
    public String toString() {
        return "History{" +
                "historyId=" + historyId +
                ", newState=" + newState +
                ", changeDate=" + changeDate +
                ", commentary='" + commentary + '\'' +
                ", orderId=" + orderId +
                ", staffId=" + staffId +
                ", newStateName='" + newStateName + '\'' +
                ", staffName='" + staffName + '\'' +
                '}';
    }
}